﻿@model Achievement.DataModels.VFolder
@{
    ViewBag.Title = "EditFolder";
    Layout = null;
}

<div style="height: 20px; font-weight: bold">
    <b>修改文件夹</b></div>
<div style="padding-top: 50px; padding-bottom: 50px">
@using (Html.BeginForm("SaveFolder", "Folder", FormMethod.Post, new { id = "form" }))
{
    <div style="text-align: left; padding: 0px 10px 20px 50px">
        <table style="line-height: 40px">
            <tr>
                <td>
                    <span style="font-weight: bold;">名称：</span>
                </td>
                <td>@Html.TextBox("name")@Html.Hidden("id",Model.ID)
                </td>
            </tr>
            <tr>
                <td>
                    <span style="font-weight: bold; float: left;">所属：</span>
                </td>
                <td style="vertical-align: middle">
                    <input type="text" name="folder" id="folder" value="" />
                </td>
            </tr>
        </table>
    </div>
    <div style="text-align: center">
        <button id="btnRoles" class="btn">
            保存</button>
    </div>
}
</div>
<ul id="categorymenu" class="mcdropdown_menu">
    @Html.Raw(ViewData["ddlParent"].ToString())
</ul>
<script>
    $("#current_rev").html("v" + $.mcDropdown.version);
    $("#folder").mcDropdown("#categorymenu", {
        select: TakeFolderValue,
        allowParentSelect: true,
        delim: "=>"
    });
    var dd = $("#folder").mcDropdown();
    dd.disable(false);
    dd.setValue(@(Model.Parent??0));
    function TakeFolderValue(v) {
        //alert(v);
    }
    $(".btn").button();
</script>